<?php
namespace Ps\Model;

use PhalApi\Model\NotORMModel as NotORM;

class Demo extends NotORM {
  
  protected function getTableName($id) {
    $tableName = 'demo';
    if ($id > 100 && $id <=200) {
      $tableName .= '_0';
    } else if ($id > 200) {
      $tableName .= '_1';
    }
    return $tableName;
  }

  public function getDemoInfo($id) {
    return $this->getORM($id)->where('id', $id)->fetchOne();
  }
	
}